﻿namespace Digitalmes.Domain.Entities.Sys;

/// <summary>
/// 系统字典数据表
/// </summary>
[SugarTable("sys_dict_data")]
public sealed class SysDictData : AuditedEntity
{
    /// <summary>
    /// 字典 Id
    /// </summary>
    public long DictId { get; set; }

    /// <summary>
    /// 字典属于类型
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(DictId))]
    [NotNull]
    public SysDict? Dict { get; set; }

    /// <summary>
    /// 字典条目编码（设定后不能修改）
    /// </summary>
    [NotNull]
    public string? Code { get; set; }

    /// <summary>
    /// 字典条目值
    /// </summary>
    [NotNull]
    public string? Value { get; set; }

    /// <summary>
    /// 是否是固定的（固定后不能修改）
    /// </summary>
    public bool IsFixed { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 启用状态（0->停用，1->启用）
    /// </summary>
    public EnabledStatusEnum Status { get; set; }
}
